/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020.
 * Description: kbox regions extern head file.
 * Author: chenzefeng
 * Create: 2020-7-2
 */

#ifndef __KBOX_DYNAMIC_H
#define __KBOX_DYNAMIC_H
#include "kbox_include.h"

#ifdef CONFIG_RTOS_KBOX_REGIONS_EXTEND
extern void kbox_memory_list_dym_init(void);
extern bool check_kbox_dym_region_desc(char *warning_str, int *warning_str_len);
extern kbox_region_desc *kbox_dym_region_desc_find(const char *name);
extern int create_dym_history_regions(void);
int create_new_kbox_dym_region(kbox_region_desc **plogdes,
	const char *create_name, u32 create_size, unsigned char flags);
extern void kbox_do_delete_dym_region(kbox_region_desc *region_desc);
#else
static inline void kbox_memory_list_dym_init(void) { }
static inline bool check_kbox_dym_region_desc(const char *warning_str, int *warning_str_len)
{
	return false;
}
static inline kbox_region_desc *kbox_dym_region_desc_find(const char *name)
{
	return NULL;
}
static inline int create_dym_history_regions(void)
{
	return 0;
}
static inline int create_new_kbox_dym_region(kbox_region_desc **plogdes,
	const char *create_name, u32 create_size, unsigned char flags)
{
	return -ENOENT;
}
static void kbox_do_delete_dym_region(kbox_region_desc *region_desc) { }
#endif

#endif
